package comms;

/**
 * Commands recognised from the Phone that may be handled by the app. 
 * 
 * Feed phone message into here and switch over result for commands interested in.
 * 
 * @author norrielm
 *
 */
public class PhoneInterface {

	public static enum commands {
		//app type
		ANGLES_APP, HOTSPOT_APP,
		//app 
		HOTSPOT, LOG, 
		//default
		UNDEFINED}; 
	
	public static PhoneInterface.commands handleKinectMessage(String s){
		s = s.toLowerCase();
	
		
		if(s.contains("hotspot app"))
			return PhoneInterface.commands.HOTSPOT_APP;
		
		else if(s.contains("angles app"))
			return PhoneInterface.commands.ANGLES_APP;
		/* ******* */		
		//mark hotspot
		else if(s.contains("hotspot"))
			return PhoneInterface.commands.HOTSPOT;

		//create logfile
		else if(s.contains("log"))
			return PhoneInterface.commands.LOG;
		//None
		else
			return commands.UNDEFINED;
	}

	
}
